package com.archetype.scaffold.generate.main;


import com.cellulam.framework.scaffold.generate.TemplateGenerator;
import com.cellulam.framework.scaffold.generate.TemplateGeneratorFactory;

public class GenerateMain {
    public static void main(String[] args) throws Exception {

        //使用前注意下列选项，最好先提交代码，避免代码被覆盖

        TemplateGeneratorFactory factory =
                new TemplateGeneratorFactory("com.archetype", "com.archetype", "biz-archetype", "biz-archetype-scaffold");
        TemplateGenerator generator = factory.createGenerator();

        generator.enableController = false;// 是否生成Controller文件, 默认: false  api项目不要开启次选项


        generator.forceOverrideDtoRequest = false;// 是否强制覆盖DtoRequest文件, 默认: false
        generator.forceOverrideDtoResponse = false;// 是否强制覆盖DtoResponse文件, 默认: false
        generator.forceOverrideBean = true;// 是否强制覆盖Bean文件, 默认: true
        generator.forceOverrideDao = false;// 是否强制覆盖Dao文件, 默认: false
        generator.forceOverrideService = false;// 是否强制覆盖Service文件, 默认: false
        generator.forceOverrideBaseMapper = true;// 是否强制覆盖BaseMapper文件, 默认: true
        generator.enableLocalDateTime = true;// 是否启用使用LocalDateTime, 默认: false

        generator.start();

        System.out.println("generate done");
        System.exit(1);
    }
}
